home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15209 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Interesting program
  5. Date: 17 Apr 1996 15:58:59 -0500
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4l3m2j$bav@solutions.solon.com>
  8. References: <4kshg7$a93@mirv.unsw.edu.au>
  9. Reply-To: seebs@solon.com
  10. NNTP-Posting-Host: solutions.solon.com
  11.  
  12. In article <4kshg7$a93@mirv.unsw.edu.au>,
  13. system PRIVILEGED account  <root> wrote:
  14. >Did someone knows how to write a program when compiled and executed, will 
  15. >produced the source code itself?  For example, the name of the program is
  16. >hello.c, when I compiled it and executed it like this
  17.  
  18. >         hello>output
  19.  
  20. >output will the same as hello.c!
  21.  
  22. It's possible, but harder than it looks; the most commonly quoted one has two
  23. bugs, others may have more.
  24.  
  25. Common mistakes:
  26. No prototype for printf().  No trailing newline.  ASCII dependant.
  27.  
  28. -s
  29. -- 
  30. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  31. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  32. Unsolicited email is not welcome, and will be billed for at consulting rates.
  33. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  34.